// const http = function (){}

const http = function(url="",data={},method="GET"){
  return new Promise((resolve,reject)=>{
    wx.request({
      url: url,
      data,
      method,
      success:function(result){
        resolve(result)
      },
      fail:function(err){
        reject(err)
      }
    })
  })
}
const get = function(url="",data={}){
   return http(url,data,"GET")
}
const post = function(url="",data={}){
   return http(url,data,"POST")
}
module.exports = {
  http,
  get,
  post
}
// https://app.vmovier.com/apiv3/index/index